package com.mycomp.assignments;

import java.util.Scanner;

public class MyBank implements Bank {

	double balance = INITIAL_DEPOSIT;

	// Scanner input = new Scanner(System.in);
	public void withdraw(double amount) {

		if (amount < balance && (balance - amount) > 200) {
			balance -= amount;
			System.out.println("Your new balance is $" + balance);
		} else {
			System.out.println("Exceeds the available balance");
		}
		if ((balance - amount) < 200) {
			System.out.println("You have reached the minimum balance limit");
		}

	}

	public void deposit(double amount) {

		balance += amount;
		System.out.println("Your new balance is " + balance);

	}

	public double getBalance() {
		return balance;
	}

	public void setBalance(double balance) {
		this.balance = balance;
		System.out.println("Your current available balance is " + balance);
	}

	public void getBalance(double balance) {
		// TODO Auto-generated method stub

	}

	public static void main(String[] args) {
		MyBank info = new MyBank();
		info.withdraw(0);
		info.deposit(0);
		info.getBalance();

		int options = 4;

		boolean quit = false;
		Scanner input = new Scanner(System.in);
		System.out.println("Enter the options");
		options = input.nextInt();
		do {
			switch (options) {
			case 1:
				System.out.println("Enter the withdraw");
				 double amount = input.nextDouble();
				 info.withdraw(0);
				break;
			case 2:
				System.out.println("Enter the deposit");
				amount = input.nextDouble();
				info.deposit(0);
			case 3:
				info.getBalance(0);
			case 0:
				System.out.println("Wrong input");
			default:
				System.out.println("Wrong input");

			}
			System.out.println();
		} while (!quit);
		System.out.println("Thank you");

	}
}
